package com.yifan.planMode.observer;

/**
 * @Author YIFan
 * @Date 2020/12/3 17:29
 * @Version 1.0
 */
public class test {
    public static void main(String[] args) {
        Xiong1 xiong = new Xiong1();
        QianGe1 qianGe1 = new QianGe1();
        QianGe2 qianGe2 = new QianGe2();
        qianGe1.addObserver(xiong);
        qianGe2.addObserver(xiong);
        qianGe1.notifyObserver("我来砍树了");
        qianGe2.notifyObserver("抓熊大去");
    }
}
